if not security.getSU() then
 exception.throw("RestrictedOpsException")
 return
end

gui.printAppInfo("tpm", "redownloading package.dat")
if tpm.getPaste("/etc/tpm/package.dat", "0YScZtUc", true) then
 gui.printAppSuccess("tpm", "package cache updated")
 log.writeMessage("package cache updated")
else
 gui.printAppInfo("tpm", "failed to update package cache")
 log.writeMessage("failed to update package cache")
end